package com.linden.std.service.auth;

import com.linden.std.domain.dto.ChangePasswordRequest;
import com.linden.std.domain.dto.LoginRequest;
import com.linden.std.domain.vo.LoginResponse;
import com.linden.std.domain.vo.TokenResponse;
import com.linden.std.domain.vo.UserVO;

import javax.servlet.http.HttpServletRequest;

/**
 * 本地认证服务接口
 */
public interface LocalAuthService {
    
    /**
     * 用户登录
     */
    LoginResponse login(LoginRequest request, HttpServletRequest httpRequest);
    
    /**
     * 刷新Token
     */
    TokenResponse refreshToken(String refreshToken);
    
    /**
     * 用户登出
     */
    void logout(String token, HttpServletRequest request);
    
    /**
     * 验证Token
     */
    UserVO validateToken(String token);
    
    /**
     * 修改密码
     */
    void changePassword(ChangePasswordRequest request);
}